'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
  async index() {
    const { ctx } = this;
    // ctx.body = 'hi, user';
    ctx.body = await ctx.model.User.find();
  }
  async getUserList() {
    const { ctx } = this;
    console.log('body:', ctx.request.body);
    // ctx.body = 'hi, user';
    ctx.body = await ctx.model.User.find();
  }
  async createUser() {
    const { ctx } = this;
    // ctx.body = 'hi, user';
    ctx.body = await ctx.model.User.find();
  }
}

module.exports = UserController;
